							<!-- Comment Section -->
                  
                  <script>
 tinyMCE.init({
                // General options
               	mode : "exact",
				width:600,
				height:150,
				elements : "comment_content",
                theme : "advanced",
				skin : "o2k7",
skin_variant : "silver",
                plugins : "advhr,advlink,emotions,media,directionality",

                // Theme options
                theme_advanced_buttons1 : "bold,italic,underline,strikethrough,| , justifyleft, justifycenter , justifyright ,justifyfull,|, link,unlink,preview,|,forecolor,|,emotions,image,advhr,|,fullscreen ",
              
				theme_advanced_buttons2 : "",
				theme_advanced_buttons3 : "",
                theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "left",
                theme_advanced_statusbar_location : "bottom",
                theme_advanced_resizing :false,
				extended_valid_elements : "a[href|rel|rev|target|title|type]",
				invalid_elements : "script,marquee,iframe,p,object" ,
				 theme_advanced_resizing :false,
				relative_urls : false, // Default value
				remove_script_host : false

                       
        })

 </script>
 
                          	<div id="wrap_comment_view">
                          <fieldset id="comment_wrap">  
                          <legend class="comment_view_h5">
                           COMMENTS [<?php echo $data[num] ?>]
                          </legend>		
                            
                                                          <!-- =========================================================Phan trang phan hoi ====================== -->
        	              
                            
                <?php
						$sotrang=$data[num];
				if($data[num] >0)
				{
						$sotrang= ceil($sotrang/10);
						?>
                        
                        <div><span id="phantrangtapchi1" style="float:right; padding:0px; margin:0px; height:25px "></span></div> 
                        <div style="clear:right"></div>   
                        <br />
						<div id="tapchi" align="center"></div>   
						<div><span id="phantrangtapchi2" style="float:right; padding:0px; margin:0px; height:25px "></span></div> 
                        <div style="clear:right"></div>     
						 <script type="text/javascript">
						var bookphanhoi=
						{
						pages:[<?php for($i=1;$i<=$sotrang;$i++) {
						if($i==$sotrang)
						{
						echo "\"index.php?module=comment&pr=".$data[per]."&act=pg&url=".$data[geturl]."&id=".$_GET['id']."&p=".$i."\"";
						}
						else
						{ 
						echo "\"index.php?module=comment&act=pg&pr=".$data[per]."&url=".$data[geturl]."&id=".$_GET['id']."&p=".$i."\",";
						} 
					} ?>],selectedpage:0 
					}
		
					var mybookinstance1=new ajaxpageclass.createBook(bookphanhoi, "tapchi", ["phantrangtapchi1","phantrangtapchi2"])
		
					</script> 
                    <?php
					}
					?>

                  

                           
                             
                </div><!-- end #wrap_comment_view -->
		
						<h5 class="comment_view_h5"> <img src="public/images/comment-icon.png" /><a href="<?php echo url();?>#com">ĐỂ LẠI PHẢN HỒI</a></h5>
					  <fieldset id="comment">
                           
                          			<?php if(!isset($_SESSION['username']))
											{
												?>
                                                <div>
                                           			  <label>Tên của bạn (*) </label><input type="text" id="comment_user" value="" />
                                             </div>
                                            <?php
											}
											else
											{
											?>
                                            <div>
                                            <input type="hidden" id="comment_user" value="<?php echo $_SESSION['username']?>" />  </div>
                                            <?php
											}?>
                                          
                                            <div>
                                           <input type="hidden" id="comment_geturl" value="<?php echo $data[geturl]?>" />
                                         <input type="hidden" id="comment_tieude" value="<?php echo2($data[tieude])?>" />
                                          <input type="hidden" id="comment_url" value="<?php echo url();?>" />
         									<input type="hidden" id="comment_id" value="<?php echo $_GET['id'];?>" />
                                            <input type="hidden" id="ip" value="<?php echo get_ip();?>" />
                          				</div>
                          
                            <div>
                            <a name="com">&nbsp;</a>
                           <textarea name="comment_content" id="comment_content"></textarea>
                            </div>
                         
                            <div>    <img id="siimage" align="left" style="padding-right: 5px; border: 0" src="libraries/captcha/securimage_show.php?sid=<?php echo md5(time()) ?>" />
             
        <!-- pass a session id to the query string of the script to prevent ie caching -->
       
        <br />
        <a tabindex="-1" style="border-style: none" href="#" title="Refresh Image" onClick="document.getElementById('siimage').src = 'libraries/captcha/securimage_show.php?sid=' + Math.random(); return false"><img src="libraries/captcha/images/refresh.gif" alt="Reload Image" border="0" onClick="this.blur()" align="bottom" /></a> <br />
        <div style="clear:left"></div>
    <label><strong>Captcha</strong></label><input type="text" name="security" id="security" value="" /> </div>
    					
    
                            <div>
                            <label>&nbsp;</label><input  type="button" value="Post Comment" name="ok" onclick="add_comment()" style="padding:3px" /></div>
                           
                          
                                
                                
</div>      